import { request } from '@/service/request';

/**
 * 获取配置列表
 */
export function getAiConfigList() {
  return request<Api.AiConfig.Info[]>({
    url: '/AiConfigs/List'
  });
}

/**
 * 添加配置
 * @param data
 */
export function addAiConfig(data: Api.AiConfig.AddOrEdit) {
  return request<number>({
    url: '/AiConfigs',
    method: 'post',
    data
  });
}

/**
 * 更新配置
 * @param data
 */
export function updateAiConfig(data: Api.AiConfig.AddOrEdit) {
  return request<number>({
    url: '/AiConfigs',
    method: 'put',
    data
  });
}

/**
 * 删除配置
 * @param id
 */
export function deleteAiConfig(id: string) {
  return request<number>({
    url: `/AiConfigs/${id}`,
    method: 'delete'
  });
}


